#ifndef IIMPRIMIBLE_H
#define IIMPRIMIBLE_H

#include <ostream>


/** Usa "virtual friend function idiom" para imprimir los registros
 * */
class IImprimible {
protected:
	virtual void ImprimirEn(std::ostream& out) const = 0;

public:
	IImprimible(){}
	virtual ~IImprimible(){}

	friend std::ostream& operator<<(std::ostream& out, IImprimible const & reg);
};


inline std::ostream& operator<<(std::ostream& out, IImprimible const & reg){
	reg.ImprimirEn(out);
	return out;
}

#endif
